Network traffic monitoring is important in network management to accurately investigate and fix network issues, to accurately estimate cost of applications running on the network, and to efficiently allocate network resources (e.g., bandwidth). For example, with the emergence of cloud computing, an important element in calculating or estimating cloud cost is an amount of network traffic attributed to a particular cloud based application. Accordingly, to accurately measure network traffic generated by an application, it would be desirable to capture all network connections and traffic generated by the application communicating with subnets in the network and to determine a direction of the traffic.